<?php
/**
 * CK 开发框架
 * User: Clake
 * Date: 15/7/30
 * Time: 02:53
 */

namespace CK\Ex;


use CK\Core\Config;

class ExWeixin extends \Exception {
    public function __construct($data) {
        $err_list = Config::inst('Weixin',CK_CONF_PATH)->get();
        $this->code = $data['errcode'];
        if (isset($err_list[strval($data['errcode'])])) {
            $this->message = $err_list[strval($data['errcode'])];
        } else {
            $this->message = $data['errmsg'];
        }
    }
}